%LibSVM Testing

clear; close all; clc;

load ../data/music_dataset.mat
addpath 'CV/' 'DT/' 'Lyrics_Kernel/' 

[Xt_lyrics] = make_lyrics_sparse(train, vocab);
[Xq_lyrics] = make_lyrics_sparse(quiz, vocab);

Yt = zeros(numel(train), 1);
for i=1:numel(train)
    Yt(i) = genre_class(train(i).genre);
end

Xt_audio = make_audio(train);
Xq_audio = make_audio(quiz);

%% Kernelize, pass to libsvm

[test_err info] = kernel_libsvm(X,Y,Xtest,Ytest,@kernel_intersection);